<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="UTF-8">
		<title>新PMS项目</title>
		<script type="text/javascript" src="bootstrap/jquery.js"></script>
		<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css" />
		<style type="text/css">
			body{
				background-image:url("bootstrap/backgroundimg.png");
			}
			
			.div1{
				width:600px;
				height:auto;
				margin-top:10px;
				margin-left:35px;
			
			}
			hr{
			width:600px;
			border:1px solid black;
		}
	</style>
	</head>
	<body>
		
		<div class="div1">
			<h1>分享新资料</h1>
			<hr/>
			<form id="myform" action="prod.jspx?method=saveDoc" method="post">
				<fieldset>
          
					<div class="control-group">
						<label class="control-label" for="input01">标题</label>
						<div class="controls">
							<input type="text" class="span9" id="input01"  name="title" x-webkit-speech="undefined"><br/><!--资料标题-->
							<span id="title_error"></span> 
						</div>
						
					</div>
					<div class="control-group">
						<label class="control-label" for="input01">内容</label>
						<div class="controls">
						<textarea name="content" id="" class="span9" rows="15"></textarea><br/><!--资料的内容-->
						<span id="content_error"></span> 
						
						</div>
					</div>

					<div class="form-actions">
						<input  type="submit" id="btn"  value="保存"class="btn btn-primary">
						
					</div>
				</fieldset>
			</form>    
		</div>
          	<script type="text/javascript">
				$(document).ready(function(){
  			
					$("#btn").click(function(){
						var title = $("input[name='title']").val();
						var content= $("input[name='content']").val();
						if(title.trim() == "") {
							$("#title_error").html("请输入标题");
							return;
						}
						if( content.trim()== "") {
							$("#content_error").html("请输入内容");
							return;
						}
						$("#myform").submit();
  				
					});
  			
				});
  	
  	</script>
		
	</body>
</html>